modelbutton: Catch focus-in more carefully
authorMatthias Clasen <mclasen@redhat.com>
Fri, 10 Apr 2020 02:22:28 +0000 (22:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 10 Apr 2020 02:22:28 +0000 (22:22 -0400)
We need to unset the propagation limit on the focus
controller, else we miss the focus-in when the focus
enters the popover upon initial popup, when it comes
from the parent button.

gtk/gtkmodelbutton.c

index 4cc292c980713cd25e0b4446d37d9a8d8870a72a..90249bfedb6ae65f70f09d4242a13593d0266400 100644 (file)
@@ -1387,6 +1387,7 @@ gtk_model_button_init (GtkModelButton *self)
   gtk_widget_add_controller (GTK_WIDGET (self), controller);
 
   controller = gtk_event_controller_focus_new ();
+  gtk_event_controller_set_propagation_limit (controller, GTK_LIMIT_NONE);
   g_signal_connect (controller, "enter", G_CALLBACK (focus_in_cb), NULL);
   gtk_widget_add_controller (GTK_WIDGET (self), controller);